{% extends 'layouts/base-fullscreen.html' %}

{% block title %} 更新配置 {% endblock title %}

<!-- Specific CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}

{% block content %}

    <!-- Page content -->
    <div class="container" style="margin-top: -8rem!important;padding-bottom: 3rem!important;">
        <div class="row justify-content-center">
            <div class="col-lg-5 col-md-5">
                <div class="card z-index-0">
                    <div class="card-header text-center pt-5">
                        <h4>更新配置</h4>
                    </div>
                    <div class="card-body px-lg-5 py-lg-5">
                        <form method="POST">
                            {% csrf_token %}
                            {% for setting in settings %}
                            <div class="form-group">
                                <label class="form-control-label">{{ setting.name }}</label>
                                <input type="text" name="{{ setting.name }}" class="form-control"
                                       placeholder="{{ setting.placeholder }}" value="{{ setting.value }}">
                            </div>
                            {% endfor %}
                        <div class="text-center">
                                <button type="submit" class="btn btn-primary my-4">完成</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock content %}

<!-- Specific JS goes HERE -->
{% block javascripts %}

    <script>
        {% if msg %}
            notyf.error("{{ msg }}");
        {% endif %}
    </script>
{% endblock javascripts %}
